﻿using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Collections.Generic;
using System.Linq;
using System.Data.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Drawing;
using System.Text;
using System.Web.Mvc;
using System.IO;
using System.Data.Objects;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using AskpldtUHW.Models;
using System.Web.Helpers;

namespace AskpldtUHW.Controllers
{
    public class HomeController : Controller
    {

        ASKPLDTV2 cms_dbconnect = new ASKPLDTV2();
        //
        // GET: /Home/

        ASKPLDTV2 askpldt = new ASKPLDTV2();


        public ActionResult Index()
        {
            return View();
        }

        public ActionResult MainAskpldt()
        {
            return PartialView();
        }

        public ActionResult BalanceInquiry()
        {
            return View();
        }

        public ActionResult FollowUpApplication()
        {
            return View();
        }

        public ActionResult RequestReconnection()
        {
            return View();
        }

        public ActionResult ReportTrouble()
        {
            return View();
        }

        public ActionResult FollowUpTroubleReport()
        {
            return View();
        }

        public ActionResult CheckTelerewards()
        {
            return View();
        }

        public ActionResult DirectoryServices()
        {
            return View();
        }

        public ActionResult SalesServiceCenters()
        {
            var query = cms_dbconnect.SSCs.OrderBy(a => a.sscidPK);
            return View("SalesServiceCenters", query);
            
        }

        public PartialViewResult SearchSSC(string cityprov)
        {
            var searchQuery = (from u in cms_dbconnect.SSCs
                               where u.centername.Contains(cityprov)
                               select u).ToList();

            if (searchQuery != null && searchQuery.Count() > 0)
            {
                return PartialView("_SSC", searchQuery);
            }
            else 
                return PartialView("_NoResult");
            
        }


        public ActionResult PaymentChannel()
        {
            return View();
        }

        public ActionResult DDDSecurityInfo()
        {
            return View();
        }
    }
}
